package com.example.myapp.Activity;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.widget.LinearLayout;

import androidx.appcompat.app.AppCompatActivity;

import com.bumptech.glide.Glide;
import com.example.myapp.ADO.ActivityManager;
import com.example.myapp.R;
import com.github.chrisbanes.photoview.PhotoView;

public class Showimage extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        ActivityManager.getInstance().addActivity(this);
        super.onCreate(savedInstanceState);
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE);  //隐藏标题栏
        setContentView(R.layout.activity_showimage);
        PhotoView show_image= findViewById(R.id.showiamge);

        LinearLayout imagelayout= findViewById(R.id.imagelayout);

        Intent intent =getIntent();
         String imagepath=intent.getStringExtra("imagepath");
        Log.w("aaaa",""+imagepath);
        Glide.with(getApplicationContext()).load(imagepath).into(show_image);// CircleImageView.显示网络图片特殊方法

        imagelayout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }

    @Override
    public void onBackPressed() {
        //此处写退向后台的处理
        finish();
        Log.w("aaaa","我点击返回键！");
    }//手机返回键
}
